-
Notifications
You must be signed in to change notification settings - Fork 171
Feature/build custom analyzer #328
base: branch-3.0.13
Are you sure you want to change the base?
Conversation
import java.util.ArrayList; | ||
|
||
/** | ||
* Created by jpgilaberte on 30/05/17. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pease put author label like this
import com.stratio.cassandra.lucene.builder.JSONBuilder; | ||
|
||
/** | ||
* Created by jpgilaberte on 25/05/17. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
/** | ||
* Created by jpgilaberte on 25/05/17. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
/** | ||
* Created by jpgilaberte on 30/05/17. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
==
return new CustomAnalyzer(tokenizer, charFilter, tokenFilter); | ||
} | ||
|
||
public static CustomAnalyzer customAnalyzer(Tokenizer tokenizer) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just copy the comments before here
return new CustomAnalyzer(tokenizer, null, tokenFilter); | ||
} | ||
|
||
/** | ||
* Returns a new {@link Search}. | ||
* | ||
* @return a new search |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deberia haber una fucnion de construccion para cada uno de los charfilters, tokenizers, analyzer.... en el Builder.java. Se que Builder.java se puede contruir en un monstruo pero asi le facilitamos la tarea al ususario que solo tioene que impoortar una clase como aqui using java query builder. No se si java nos permite trocearlo en varias clases importadads ene lbuilder,l asi podriamos clasificarlo y no tendriamo en monstruo. Estas funciones deben tener javadoc. Me immporta poco que los contrauctores no lo tengan pero justo y solo esta clase si deberia tenerlos porque el ususario tarabaja con el builder y el ctrl space es nuetsro amigo.
*/ | ||
public class SwedishlightstemTokenFilter extends TokenFilter{ | ||
|
||
@JsonCreator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Realmente, al haber copiado las clases del plugin el JSoncreator no hace falta porque desde el builder solo se crean jsones y no al reves.
public class SynonymTokenFilter extends TokenFilter{ | ||
|
||
@JsonCreator | ||
public SynonymTokenFilter(){} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Como lo que te decia antes. no puede haber constructoir sin los parametros obligatorios. Es decoir este constructor sobra.
@@ -1522,9 +1919,9 @@ into your Cassandra installation lib directory. | |||
**Example 2:** Index only the centroid of the WKT shape contained in the indexed column: | |||
|
|||
.. image:: /doc/resources/geo_shape_mapper_example_2.png | |||
:width: 100% | |||
:width: 100% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
el formato que te pase no vale para los rst y cambia la indentacion de las imagenes no debería
} | ||
|
||
object CharFilterBuilder{ | ||
final val ESCAPED_TAGS = "escapedtags" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Como he dicho antes los jsones deben ir 'escaped_tags'
test("mapParsed function") { | ||
// val testBuilderChild = TestBuilderChild() | ||
// val mapParsedTest = testBuilderChild.mapParsed | ||
// assert(mapParsedTest.size == 3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Condigo comnetando no or favor, si son tets paara el futuor wikipedia contsructor hazte una rama aparte y ponlo ahí, ny ay cuando suabmos version lo mergeamos
No description provided.